package com.mender.product.mapper;

import com.mender.product.domain.po.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 根据菜品id查询套餐id
     * @param DishIds
     * @return
     */
    List<Long> listSetmealDish(List<Long> DishIds);

    /**
     * 新增套餐菜品关系
     * @param setmealDishs
     */
    void save(List<SetmealDish> setmealDishs);

    /**
     * 根据套餐id删除套餐菜品关系
     * @param ids
     */
    void deleteBySetmealIds(List<Long> ids);

    /**
     * 根据套餐id查询套餐菜品关系
     * @param setmealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> selectBySetmealId(Long setmealId);
}
